package com.grq.mis.dao;

import com.grq.mis.entity.Role;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.Sql;
import org.beetl.sql.mapper.annotation.SqlResource;
import org.springframework.stereotype.Repository;

import java.util.List;

/*
* 
* gen by beetlsql3 mapper 2021-11-21
*/
@SqlResource("role")
@Repository
public interface RoleDao extends BaseMapper<Role> {

    @Sql(value = "select r.* from t_role as r,t_user_role as ur where r.id = ur.role_id and ur.user_id = ?")
    List<Role> findByUserId(Long userId);
	
}
